<!-- 
	스터디에 관련된 벌금 관련 정보를 표시 
	서블릿으로 부터 Study 객체를 받아와서 보증금과 벌금 정보 출력
	수정할 사항
		- 서블릿으로 부터 벌금 관련 객체를 받아와서 출력해야 한다.
 -->
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="java.util.*" %>
<%@ page import="model.*" %>
<!DOCTYPE HTML>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0 maximum-scale=1.0, user-scalable=no" />
	<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
	<link rel="stylesheet" href="css/questudy.css" />
	
	<script src="http://code.jquery.com/jquery.js"></script>
	<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
	<script src="js/questudy.js" ></script>
<title>Welcome to Questudy</title>
</head>
<%
	float[] myMoney=null;
	ArrayList<Warning> warningList = new ArrayList<Warning>();
	ArrayList<String> memIdList = new ArrayList<String>();
	if(request.getAttribute("myMoney") != null)
		myMoney = (float[])request.getAttribute("myMoney");
	int studyId = ((Integer)request.getAttribute("studyId")).intValue();
	if(request.getAttribute("memIdList") != null) {
		memIdList = (ArrayList<String>)request.getAttribute("memIdList");
	}
%>
<body>
	<jsp:include page="/nav/nav_main.jsp"></jsp:include>
	<jsp:include page="/nav/nav_study.jsp"></jsp:include>
	<div class="conatiner firstDiv">
		<div class="col-md-6 col-lg-6 col-md-offset-3 col-lg-offset-3">
			<div class="panel panel-default">
				<div class="panel-body">
				    <%
				    int deposit=0;
				    if(request.getAttribute("deposit") != null) {
						deposit =(Integer)request.getAttribute("deposit");
					}
				    	//int depositSum = 0;
						//int studyMem = 0;
				    	//for(Warning warn : warningList) {
				    	//	depositSum += warn.getDeposit();
				    	//	studyMem++;
				    	//}
				    %>
				    총 보증금 : <%= deposit %> 인원수 : <%= memIdList.size() %> 
				</div>
			</div>
			<div class="table-responsive">
				<table class="table table-hover">
					<tr>
						<th>ID</th>
						<th>부과된벌금</th>
					</tr>
					<%
						for(int i = 0; i < memIdList.size() ; i++) { %>
						<tr>
							<td><%= memIdList.get(i) %></td>
							<td><%= myMoney[i] %></td>
						</tr>
					<% } %>
				</table>
			</div>
		</div>
	</div>

</body>
</html>